package com.itheima.boject;

import java.util.Scanner;

public class StringDemo {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入:");
        String s = sc.next();
        //遍历数组
        for (int i = 0; i < s.length(); i++) {
        //char charAt(int index) 获取指定索引位置的字符
            char c = s.charAt(i);
            System.out.println(c);
        }
    }
}
